import { IllnessTime, EconsultFlag } from '@/enums'
const IllnessTimeArr = [
  { label: '一周内', value: IllnessTime.Week },
  { label: '一月内', value: IllnessTime.Month },
  { label: '半年内', value: IllnessTime.HalfYear },
  { label: '半年以上', value: IllnessTime.More }
]
export const getIllnessTime = (val: IllnessTime) => {
  const findItem = IllnessTimeArr.find(item => item.value === val)
  // (findItem===null || findItem===undefined)?undefined:findItem.label
  return findItem?.label
}
const FlagArr = [
  { label: '没就诊过', value: EconsultFlag.NO },
  { label: '就诊过', value: EconsultFlag.YES }
]
export const getFlag = (val: EconsultFlag) => {
  const findItem = FlagArr.find(item => item.value === val)
  // (findItem===null || findItem===undefined)?undefined:findItem.label
  return findItem?.label
}
